package components.resultLayer
{
	import UIFree.uif_component;
	
	import components.clt_layer;
	
	import flash.geom.Rectangle;

	public class clt_resultLayer extends clt_layer {
		private	var _editor					: clt_editLayer;
		public static const MAXRESULTSIZE	: int = 600;
		
		public function clt_resultLayer(parent:uif_component, a_width:int, align:String=ALIGNTOP, styleClass:String='') {
			var s_space: Number = parent.app.getStyleSpace(styleClass) * 2;
			var set_height: Number = (a_width - s_space > MAXRESULTSIZE)?MAXRESULTSIZE + s_space:a_width;
			
			super(parent, set_height, align, styleClass);
			var inner: Rectangle = getInner();
			_editor = new clt_editLayer(this, inner.x, inner.y, a_width, inner.height);
			_editor.x = inner.x;
			_editor.y = inner.y;
		}
		
		public function get display(): clt_resultBitmap {
			return _editor.display;
		}
		
		public function get editor(): clt_editLayer {
			return _editor;
		}
	}
}